﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true"  CodeFile="Documents.aspx.cs" Inherits="admin_Documents"  %>


<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server">
   
<div class="grid_16" id="content">
    
    <div class="grid_9">
        <h1 >
            <img alt="" src="../images/Documents.png" style="width: 35px; height: 35px" /> 
            Documents</h1>
    </div>
   <!--RIGHT TEXT/CALENDAR END-->
    <div class="clear">
    </div>
    <!--  TITLE END  -->    
    <!-- #PORTLETS START -->
    <div id="portlets">
    <!-- FIRST SORTABLE COLUMN START -->
      <!-- FIRST SORTABLE COLUMN END -->
      <!-- SECOND SORTABLE COLUMN START -->
      
	<!--  SECOND SORTABLE COLUMN END -->
    <div class="clear"></div>
    <!--THIS IS A WIDE PORTLET-->
 </div>    

        <table  width="100%" cellpadding="0" cellspacing="0" 
            
          id="box-table-a"   style="border: thin dotted #FFFFFF; color: #808080; text-decoration: none;">
            <thead>
              <tr>                
                <th style="background-color: #EAEAEA; width: 100px;"  scope="col" align="left" 
                      height="25">Name</th>
                <th style="background-color: #EAEAEA; width: 100px;" scope="col" align="left">
                    Document Type</th>
                <th style="background-color: #EAEAEA; width: 30px;" align="left" scope="col">Mandatory</th>
              
                <th style="background-color: #EAEAEA; width: 150px;" align="left" scope="col">Description</th>
              </tr>
            </thead>
            <tbody>
                <% if (Doc!=null && Doc.Count>0) {
                   foreach (RE_GenericBean rgb in Doc)
                   {
            %>
              <tr>  
                <td style="height: 20px; width: 100px;"><a href="Documents.aspx?id=<%=rgb.intC1 %>"</a><%=rgb.strC1 %></td>
                <td style="height: 20px; width: 100px"><%=rgb.strC4 %></td>
                <td style="height: 20px; width: 30px"><%=rgb.strC5 %></td>
       
                <td style="height: 20px; width: 150px"><%=rgb.strC3 %></td>
                <!-- <td style="height: 20px"><a href="Documents.aspx?id=<%=rgb.intC1 %>" class="edit_icon" title="Edit">&nbsp;&nbsp;&nbsp;&nbsp;EDIT</a></td>-->
              
              </tr>
                <%     }
               }
            %>
            </tbody>
            </table>
<asp:ScriptManager runat ="server" ></asp:ScriptManager>
    
   <table id="table2" width="100%" cellpadding="0" cellspacing="0" >
   <thead>
              <tr>                
                <th style="width: 414px"> </th>
                <th > 
                    <asp:LinkButton align="center" ID="LinkButton4"  runat="server" class="button_add" 
              onclick="LinkButton4_Click" Height="30px" Width="65px"><span>Add</span></asp:LinkButton>
           
      
                   
           
      
                    <cc1:ModalPopupExtender PopupControlID="pnlAddDoc" ID="LinkButton4_ModalPopupExtender" runat="server" 
                        DynamicServicePath="" Enabled="True" TargetControlID="LinkButton4" BackgroundCssClass="FondoAplicacion" > 
                    </cc1:ModalPopupExtender>
           
      
                   
           
      
                  </th>
                <th> </th>
              
              </tr>
   </thead>
   
   
   
   
   
   </table>
          
        
         
         
        
          
         
         
   
    
<!--  END #PORTLETS --> 


         
         
<table width="100%" cellpadding="0" cellspacing="0" id ="box">

<thead>

</thead>


</table> 
   
    <div class="clear"> </div>
    <div class="clear"> </div>
    <asp:Panel ID="pnlAddDoc" runat="server" CssClass="CajaDialogo" Width="733px">
        <table width="700" cellpadding="0" cellspacing="0"  id="box-table-a" summary="Add Location" align="center">
        <thead>
            <tr align="center">
                <th align="center" scope="col">
                    Documents&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="lb_error2" runat="server" ForeColor="#FF3300" 
                        Text="ERROR!: THIS DOCUMENT CAN´T BE DELETED"></asp:Label>
                </th>

            </tr>
        </thead>
        <tbody>
            <tr>
                <td align="center">
                    <table width="90%">
                            <tr>
                                <td style="height: 50px; width: 258px;">Document Name</td>
                                <td style="width: 185px; height: 50px;">
                                    <asp:TextBox ID="tb_Doc" runat="server" Height="27px" Width="318px"></asp:TextBox>
                                    <asp:Label ID="lb_Docid" runat="server" Text="0" 
                                        EnableTheming="True" Visible="False"></asp:Label>
                                </td>
                                
                            </tr>
                            <tr>
                                <td style="height: 58px; width: 258px;">Document Type</td>
                                <td style="width: 185px; height: 58px;">
                                    <asp:DropDownList ID="DropDownList1" runat="server" Height="32px" Width="309px" 
                                        DataValueField="id">
                                    </asp:DropDownList>
                                </td>
                                
                            </tr>
                            <tr>
                                <td style="height: 41px; width: 258px;">Mandatory</td>
                                <td style="width: 185px; height: 41px;">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Label ID="Label1" runat="server" Text="CHECK = YES"></asp:Label>
                                    <asp:CheckBox ID="CBmandatory" runat="server" 
                                        oncheckedchanged="CBmandatory_CheckedChanged" />
                                </td>
                           
                            </tr>
                            <tr>
                                <td style="height: 39px; width: 258px;">Order</td>
                                <td style="width: 185px; height: 39px;">
                                    <asp:TextBox ID="tb_Order" runat="server" Height="34px" Width="321px" 
                                        Enabled="False"></asp:TextBox>
                                </td>
                            </tr> 
                             <tr>
                                <td style="height: 50px; width: 258px;">Description</td>
                                <td style="width: 185px; height: 50px;">
                                    <asp:TextBox ID="tb_Description" runat="server" Height="134px" 
                                        TextMode="MultiLine" Width="327px" 
                                        ></asp:TextBox>
                                </td>
                                
                            </tr>
                            <tr align="right">
                                <td colspan="4" align="right">
                                
                                    <span>&nbsp;</span>
                                    <asp:LinkButton ID="LinkButton1" runat="server" class="button_ok" onclick="LinkButton1_Click" 
                                        ><span>SAVE</span></asp:LinkButton>

                                       <asp:LinkButton ID="LinkButton3" runat="server" class="button_notok" 
                                        onclick="LinkButton3_Click"><span>DELETE</span></asp:LinkButton>

                                      <asp:LinkButton ID="btnCuentaCancelar" runat="server" class="button_cancel" 
                                        onclick="Button1_Click1"><span>CANCEL</span></asp:LinkButton>
                                         
                                      
                                  
                                    <asp:Label ID="lb_error" runat="server" ForeColor="#FF3300" 
                                        Text="ERROR!: YOU NEED TO FILL THE FIRST TWO FIELDS"></asp:Label>
                                         
                                      
                                  
                                </td>
                            </tr>
                        </table>
                
                </td>
            </tr>
        </tbody>
        </table>
    </asp:Panel>
  

    </div>
</asp:Content>

